; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv32 -mattr=+experimental-b -verify-machineinstrs < %s \
; RUN:   | FileCheck %s -check-prefix=RV32B
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zbe -verify-machineinstrs < %s \
; RUN:   | FileCheck %s -check-prefix=RV32ZBE

declare i32 @llvm.riscv.bcompress.i32(i32 %a, i32 %b)

define i32 @bcompress32(i32 %a, i32 %b) nounwind {
; RV32B-LABEL: bcompress32:
; RV32B:       # %bb.0:
; RV32B-NEXT:    bcompress a0, a0, a1
; RV32B-NEXT:    ret
;
; RV32ZBE-LABEL: bcompress32:
; RV32ZBE:       # %bb.0:
; RV32ZBE-NEXT:    bcompress a0, a0, a1
; RV32ZBE-NEXT:    ret
  %tmp = call i32 @llvm.riscv.bcompress.i32(i32 %a, i32 %b)
 ret i32 %tmp
}

declare i32 @llvm.riscv.bdecompress.i32(i32 %a, i32 %b)

define i32 @bdecompress32(i32 %a, i32 %b) nounwind {
; RV32B-LABEL: bdecompress32:
; RV32B:       # %bb.0:
; RV32B-NEXT:    bdecompress a0, a0, a1
; RV32B-NEXT:    ret
;
; RV32ZBE-LABEL: bdecompress32:
; RV32ZBE:       # %bb.0:
; RV32ZBE-NEXT:    bdecompress a0, a0, a1
; RV32ZBE-NEXT:    ret
  %tmp = call i32 @llvm.riscv.bdecompress.i32(i32 %a, i32 %b)
 ret i32 %tmp
}
